import urllib.request
from bs4 import BeautifulSoup
import json,re,time
def getData(x):
    data = {"hidd_type": 1,
    "txtCorpName":"",
    "ddlZzlx":"",
    "txtFOrgCode":"",
    "txtCertNum":"",
    "newpage": x,
    "newpage1":"",
    "__EVENTTARGET": "Linkbutton5",
    "__EVENTARGUMENT":"",
    "__VIEWSTATE": "/wEPDwUKLTc1MTcwMTU3NA8WCB4MQ3VyUGFnZUluZGV4BQEyHglQYWdlQ291bnQFAzY0Nx4NQ3VyUGFnZUluZGV4MQUBMR4KUGFnZUNvdW50MQUDMTY5FgICAw9kFg4CBQ8QDxYGHg1EYXRhVGV4dEZpZWxkBQV2YWx1ZR4ORGF0YVZhbHVlRmllbGQFA2tleR4LXyFEYXRhQm91bmRnZBAVCAAS5a6J5YWo55Sf5Lqn6K645Y+vDOW3peeoi+ebkeeQhgzlt6XnqIvli5jlr58M5bel56iL6K6+6K6hCeW7uuetkeS4mhXorr7orqHmlr3lt6XkuIDkvZPljJYP5pa95bel5Zu+5a6h5p+lFQgAATgBNAExATIBMwE2ATkUKwMIZ2dnZ2dnZ2dkZAINDxYCHgdWaXNpYmxlaGQCDw8WAh4LXyFJdGVtQ291bnQCFBYoZg9kFgJmDxUKAjIxEjkxMjEwMzAwMjQxNDI1NDk5SxI5MTIxMDMwMDI0MTQyNTQ5OUsw6Z6N6ZKi6ZmE5LyB54Ot6L2n5bim6ZKi5bu6562R5a6J6KOF5bel56iL5YWs5Y+4EjkxMjEwMzAwMjQxNDI1NDk5SxI5MTIxMDMwMDI0MTQyNTQ5OUsw6Z6N6ZKi6ZmE5LyB54Ot6L2n5bim6ZKi5bu6562R5a6J6KOF5bel56iL5YWs5Y+4MOmejemSoumZhOS8geeDrei9p+W4pumSouW7uuetkeWuieijheW3peeoi+WFrOWPuAnliJjlu7rls7AJ5YiY5bu65bOwZAIBD2QWAmYPFQoCMjISOTEyMTAzMDAyNDE0MjAzMjFSEjkxMjEwMzAwMjQxNDIwMzIxUifpno3pkqLpmYTkvIHkuIn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ttdhtdxO6w==",
    }
    data_string=urllib.parse.urlencode(data)
    last_data=bytes(data_string,encoding='utf-8')
    req = urllib.request.Request("http://218.60.144.163/LNJGPublisher/corpinfo/CorpInfo.aspx", last_data)
    req.add_header("Referer", "http://218.60.144.163/LNJGPublisher/corpinfo/CorpInfo.aspx")
    req.add_header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
    req.add_header("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15")
#     req.add_header("Cookie", "ASP.NET_SessionId=ukkk1gfl24uvg3kzvrdclxkk")
    req.add_header("Content-Type", "application/x-www-form-urlencoded",)
    try:
        f = urllib.request.urlopen(req,timeout=30)
    except:
        print("超时")
        time.sleep(1)
        return getData(x)
    else:
        time.sleep(1)
        fileContent = f.read().decode('utf-8')
        return fileContent 



def startLoad(start):
    for x in range(start,648):
        content = getData(x)
        soup = BeautifulSoup(content,features="html.parser")
        datas = []
        for tr in soup.select(".company_list tr"):
            tds = []
            for th in tr.findAll("th"):
                if th.has_attr("title"):
                    tds.append(th["title"])
                else:
                    tds.append(th.getText().strip())
            for th in tr.findAll("td"):
                if th.has_attr("title"):
                    tds.append(th["title"])
                else:
                    tds.append(th.getText().strip())
            a = tr.a
            if a is not None and a.has_attr("onclick") and a["onclick"].startswith("OpenCorpDetail"):
                allText = re.findall(re.compile(r'OpenCorpDetail\((.*)\)'), a["onclick"])
                if len(allText) > 0:
                    tds.append(allText[0])
                else:
                    tds.append("")
            else:
                tds.append("")
            datas.append(tds)   
            
        if len(datas) > 0:
            def save(filename, contents):
                fh = open(filename, 'w', encoding='utf-8')
                fh.write(contents)
                fh.close()
            save(f"/Users/wangshuguan/Desktop/辽宁/辽宁_{x}.txt", json.dumps(datas,ensure_ascii=False))
            print(f"{x}")
startLoad(21)